<template>
  <div>
    <el-bread></el-bread>
    <el-button @click='add' type="primary" plain size="small">添加</el-button>
    <v-list @edit='edit'></v-list>

    <v-dialog ref='diaInfo' @cancel='cancel' :dialogInfo='dialogInfo'></v-dialog>
  </div>
</template>

<script>

import vList from './list'
import vDialog from './dialog'
export default {
  data() {
    return {
     
      dialogInfo:{
        isShow:false,
        isAdd:true,
      }
    };
  },
  components:{
    vList,
    vDialog
  },
  methods: {

    add(){

      this.dialogInfo.isShow = true
 
      this.dialogInfo.isAdd =true

    },

    cancel(e){
      this.dialogInfo.isShow = e
    },

    edit(e){

      this.dialogInfo.isShow = true
    
      this.dialogInfo.isAdd =false
  
      this.$refs.diaInfo.lookup(e)
    }
  },
};
</script>

<style lang="" scoped>
.el-button{
    margin :20px 5px
}

</style>
